package com.cuc.platform.core.componet.security.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;


/**
 * 系统权限表
 * 
 *  ss_auth表的对应POJO
 */
public class SecurityAuthority implements Serializable{

	private static final long serialVersionUID = -6096612048109688716L;

	private Long id;//pk
	private String name;
	private String isAdmin;//是否系统权限
	private String descn;
	
	private List<SecurityRole> roles = new ArrayList<SecurityRole>();
	private List<SecurityResource> rescs = new ArrayList<SecurityResource>();
	
	private SecurityResource resc;

	/**
	 * @return the resc
	 */
	public SecurityResource getResc() {
		return resc;
	}

	/**
	 * @param resc the resc to set
	 */
	public void setResc(SecurityResource resc) {
		this.resc = resc;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	
	/**
	 * @return the roles
	 */
	public List<SecurityRole> getRoles() {
		return roles;
	}

	/**
	 * @param roles the roles to set
	 */
	public void setRoles(List<SecurityRole> roles) {
		this.roles = roles;
	}

	/**
	 * @return the rescs
	 */
	public List<SecurityResource> getRescs() {
		return rescs;
	}

	/**
	 * @param rescs the rescs to set
	 */
	public void setRescs(List<SecurityResource> rescs) {
		this.rescs = rescs;
	}

	/**
	 * @return the isAdmin
	 */
	public String getIsAdmin() {
		return isAdmin;
	}

	/**
	 * @param isAdmin the isAdmin to set
	 */
	public void setIsAdmin(String isAdmin) {
		this.isAdmin = isAdmin;
	}

	/**
	 * @return the descn
	 */
	public String getDescn() {
		return descn;
	}

	/**
	 * @param descn the descn to set
	 */
	public void setDescn(String descn) {
		this.descn = descn;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}
